#include "Observer.h"

namespace patterns {

void Observable::addObserver(Observer *obs) {
    observers.push_back(obs);
}

void Observable::notifyAll(void *msg) {
    //message = msg;

    for(std::list<Observer*>::iterator it = observers.begin();
        it != observers.end(); ++it) {

        (*it)->update(this, msg);
    }
}

//void* Observable::getMessage() {
//    return message;
//}

}
